<!-- html -->
<template>
    <el-table :data="tableData" border>
        <el-table-column prop="title" label="标题" />
        <el-table-column prop="author" label="作者" />
        <el-table-column prop="content" label="内容" />
    </el-table>
</template>

<!-- js或ts -->
<script lang="ts">
export default {
    name: 'shi'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
import { useRouter } from 'vue-router'

//数据
let router = useRouter()
let tableData = [
    {
        title: '2016-05-03',
        author: 'Tom',
        content: 'No. 189, Grove St, Los Angeles',
    },
    {
        title: '2016-05-03',
        author: 'Tom',
        content: 'No. 189, Grove St, Los Angeles',
    },
    {
        title: '2016-05-03',
        author: 'Tom',
        content: 'No. 189, Grove St, Los Angeles',
    },
    {
        title: '2016-05-03',
        author: 'Tom',
        content: 'No. 189, Grove St, Los Angeles',
    },
]
//方法
function shi() {
    router.push({
        path: '/shi'
    })
}
</script>

<!-- 样式 -->
<style scoped></style>